<meta charset="utf-8">
<!-- 图片库 start -->
	<div class="modal fade" id="imageModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	   <div class="modal-dialog" style="width:550px;">
		  <div class="modal-content" >
			 <div class="modal-header">
				<button type="button" class="close" 
				   data-dismiss="modal" aria-hidden="true">
					  &times;
				</button>
				<h4 class="modal-title musicTitle">
				   图片添加
				</h4>
			 </div>
			 <div class="modal-body" style="padding-top:0px;padding-bottom:0px;">
			 <div class="row" style="height:450px;">
			 	
			 	<div class="rightDiv" >
			 	  <div class="imageResp" style="position:relative;padding:10px;">
			 	  	<div style="width:100%;height:300px;overflow-y:auto;overflow-x:hidden;">
					<div ng-repeat="element in currentPic.imagesUrl" class="upload_btn" style="width:150px;padding:0px;float:left;margin-right:10px;margin-bottom:10px;">
		                 <div style="width:100%;border:1px solid #ccc;position:relative;">
		                 <div style="width:100%;height:120px;background-image:url({{element.path}}); background-size:150px 120px;overflow:hidden;">
		                 <input type="file" class="btn"  nv-file-select="" uploader="uploader" multiple="" 
		                 accept="image/jpg,image/png,image/jpeg,image/bmp,image/gif" style="padding:0px;height:120px;font-size:200px;width:150px;opacity:0;" ng-click='imageClickUpload($index)' filter:alpha(opacity=0)>
		                 </div>
		                 <button type="button" class="close" style="position:absolute;color:red;top:0px;right:5px;" ng-click="removeImg($index,false)">
					  &times;
				</button>
		                 <input type="text" style="width:100%;border:none;text-align:center;"  ng-model="element.title" placeholder="标题"/>
		                 </div>
		                 <table style="width:100%;">
		                 
		                 <!-- <tr>
		                 	<td style="text-align:left;padding-top:5px;"><input ng-class="{true:'hrefFlagActive'}[element.hrefType=='In']" style="width:70px;font-size:14px;" type="button" value="码内跳转"  ng-click="inCode($index,false)"/></td>
		                 	<td style="text-align:right;padding-top:5px;"><input ng-class="{true:'hrefFlagActive'}[element.hrefType=='Out']" style="width:70px;font-size:14px;" type="button" value="码间跳转" ng-click="outCode($index,false)"/></td>
		                 </tr> -->
		                 <tr>
		                 	<td colspan="2" style="padding-top:5px;">
		                 	<textarea rows="2" style="width:150px;resize:none;" class="hrefClass{{$index}}" hideIndex="{{$index}}" ng-model="element.href" oninput="OnInput (false,this.getAttribute('hideIndex'))" onpropertychange="OnPropChanged (false,this.getAttribute('hideIndex'))" placeholder="超链接">{{element.href}}</textarea>
		                 	
		                 </tr>
		                 </table> 
		                 
		                 
		              </div>
		              <div ng-if="currentPic.imagesUrl.length<5" class="upload_btn" style="width:150px;height:150px;background-image:url(../images/addImage.png);background-size:150px 150px;padding:0px;float:left;overflow:hidden;">
		                 <input type="file" class="btn"  nv-file-select="" uploader="uploader" multiple="" 
		                 accept="image/jpg,image/png,image/jpeg,image/bmp,image/gif" style="padding:0px;height:150px;font-size:200px;filter:alpha(opacity=0);width:150px;opacity:0;">
		              </div> 
					
		              
		              </div>
					
					
				     <div style="width:20px;height:20px;">
		              	<img class="loadImageFlag" src="../images/load.gif" ng-if="currentUploading"/> 
		              </div>
					<table class="imageElementTable">
						<tr>
							<td>效果：</td>
							<td>
							<input type="radio" name="cilckBig" value="Y" ng-model="currentPic.isClickChange"/><label for="cilckBig" style="font-weight:inherit;">点击放大</label>
							</td>
							<td>
							<input type="radio" name="cilckBig" value="N" ng-model="currentPic.isClickChange"/><label for="cilckBig" style="font-weight:inherit;">取消放大</label>
							</td>
						</tr>
						<tr>
							<td>尺寸：</td>
							<td>
							<input type="radio" name="picSize" value="Y" ng-model="currentPic.isNormalSize" ng-click="imageSizeChange(true,false)"/><label for="cilckBig" style="font-weight:inherit;">默认尺寸</label>
							</td>
							<td>
							<input type="radio" name="picSize" value="N" ng-model="currentPic.isNormalSize" ng-click="imageSizeChange(false,false)"/><label for="cilckBig" style="font-weight:inherit;">自定义尺寸</label>
							</td>
						</tr>
						
					</table>
					<table class="imageElementTable" ng-if="currentPic.isNormalSize=='N'" style="margin-left:20px;">
						<tr>
							<!-- <td width="30px" style="padding:0px;">
								<img src="../images/lock.png" ng-if="currentPic.imageWidthLock==true" style="width:15px;" ng-click="changeLock(false,false)"/>
								<img src="../images/unlock.png" ng-if="currentPic.imageWidthLock==false" style="width:20px;" ng-click="changeLock(true,false)"/>
							</td> -->
							<td><label style="font-weight:inherit;">宽度：</label></td>
							<td>
							<input type="text" name="picWidth" ng-model="currentPic.width" style="width:60px;" />
							<!-- <input type="text" name="picWidth" ng-model="currentPic.width" style="width:60px;" ng-change="changeWidthEvent(currentPic.width,false)"/> -->
							</td>
							<td><label style="font-weight:inherit;">高度：</label></td>
							<td>
							<input type="text" name="picHeight" ng-model="currentPic.height" style="width:60px;" />
							<!-- <input type="text" name="picHeight" ng-model="currentPic.height" style="width:60px;" ng-change="changeHeightEvent(currentPic.height,false)"/> -->
							</td>
						</tr>
					</table>
							
				  </div>
			 	</div>
			 </div>
			 </div>
			 <div class="modal-footer" style="border-top:none;">
				<button ng-if="currentPic.imagesUrl.length>0&&!currentUploading" type="button" ng-click="saveImage()" class="btn" 
				style="background-color:#518ab0;color:#fff;">确定</button>
				<button ng-if="currentPic.imagesUrl.length<1||currentUploading" type="button"  class="btn" 
				style="background-color:#aaa;color:#fff;">确定</button>
				<button type="button"  data-dismiss="modal" aria-hidden="true" class="btn" 
				style="background-color:#518ab0;color:#fff;">关闭</button>
			 </div>
		  </div><!-- /.modal-content -->
		</div><!-- /.modal -->
	</div>
	<!-- 图片库 end -->

	
	<script> 
      $(function () { 
        $('#myTab a:last').tab('show');//初始化显示哪个tab 
      
        $('#myTab a').click(function (e) { 
          e.preventDefault();//阻止a链接的跳转行为 
          $(this).tab('show');//显示当前选中的链接及关联的content 
        }) 
      }) 
    </script>
	<!-- 上传图片end -->